return {
    {
        "sindrets/diffview.nvim"
    },
    {

        "lewis6991/gitsigns.nvim",
        config = function ()
            require'gitsigns'.setup {
                on_attach = function(bufnr)
                    local gs = package.loaded.gitsigns

                    local function map(mode, l, r, opts)
                        opts = opts or {}
                        opts.buffer = bufnr
                        vim.keymap.set(mode, l, r, opts)
                    end

                    -- Navigation
                    map('n', ']c', function()
                        if vim.wo.diff then return ']c' end
                        vim.schedule(function() gs.next_hunk() end)
                        return '<Ignore>'
                    end, {expr=true, desc = "next hunk" })

                    map('n', '[c', function()
                        if vim.wo.diff then return '[c' end
                        vim.schedule(function() gs.prev_hunk() end)
                        return '<Ignore>'
                    end, {expr=true, desc = "prev hunk" })

                    -- Actions
                    map('n', '<space>hs', gs.stage_hunk, { desc = "stage hunk" })
                    map('n', '<space>hr', gs.reset_hunk, { desc = "reset hunk" })
                    map('v', '<space>hs', function() gs.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end, { desc = "stage hunk" })
                    map('v', '<space>hr', function() gs.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end, { desc = "reset hunk" })
                    map('n', '<space>hS', gs.stage_buffer, { desc = "stage buffer" })
                    map('n', '<space>hu', gs.undo_stage_hunk, { desc = "undo stage hunk" } )
                    map('n', '<space>hR', gs.reset_buffer, { desc = "reset buffer" })
                    map('n', '<space>hp', gs.preview_hunk, { desc = "preview hunk" })
                    map('n', '<space>hb', function() gs.blame_line{full=true} end, { desc = "blame line" })
                    map('n', '<space>tb', gs.toggle_current_line_blame, { desc = "toggle current line blame" })
                    map('n', '<space>hd', gs.diffthis, { desc = "diff this" })
                    map('n', '<space>hD', function() gs.diffthis('~') end, { desc = "diff this ~" })
                    map('n', '<space>td', gs.toggle_deleted, { desc = "toggle deleted" })

                    -- Text object
                    map({'o', 'x'}, 'ih', ':<C-U>Gitsigns select_hunk<CR>', { desc = "select hunk" })
                end
            }
        end,
    }
}
